const { createProxyMiddleware } = require("http-proxy-middleware");

module.exports = function (app) {
  app.use(
    "/v1/teaching",
    createProxyMiddleware({
      target: "127.0.0.1:8081", //后台服务器地址
      changeOrigin: true,
      pathRewrite: {
        "^/v1": "",
      },
    })
  );
  app.use(
    "/v1/user",
    createProxyMiddleware({
      target: "127.0.0.1:8081", //后台服务器地址
      changeOrigin: true,
      pathRewrite: {
        "^/v1": "",
      },
    })
  );
};
